﻿using System.ComponentModel.DataAnnotations;
namespace RapidSalesAdminPortalAPI.Models
{
    public class CallbackRequest
    {
        /// <summary>
        /// 0-succeeded, 1-failure, Others - error
        /// </summary>
        public string successcode { get; set; }
        /// <summary>
        /// The merchant ld of transaction
        /// </summary>
        public string Merchantld { get; set; }
        /// <summary>
        /// Merchant's Order Reference Number
        /// </summary>
        public string Ref { get; set; }
        /// <summary>
        /// PayDollar Payment Reference Number
        /// </summary>
        public string PayRef { get; set; }
        /// <summary>
        /// Bank Reference Number
        /// </summary>
        public string Ord { get; set; }
        /// <summary>
        /// Transaction Amount
        /// </summary>
        public decimal Amt { get; set; }
        /// <summary>
        /// Transaction Currency
        /// </summary>
        public string Cur { get; set; }
        /// <summary>
        /// Payment method (e.g. ViSA, Master, Diners, JCB, AMEX)
        /// </summary>
        public string payMethod { get; set; }
        /// <summary>
        /// The Alert Code (e.g. R14 -lP Country not match with lssuing CountrR 9 - In high risk country list)
        /// </summary>
        public string AlertCode { get; set; }
        /// <summary>
        /// secureHash
        /// </summary>
        public string secureHash { get; set; }

        /// <summary>
        /// Return bank host status code (secondary)
        /// </summary>
        public int src { get; set; }
        /// <summary>
        /// Return bank host status code (primary)
        /// </summary>
        public int prc { get; set; }
        /// <summary>
        /// Payer Authentication Status 
        /// </summary>
        public string payerAuth { get; set; }

    }

    public class CallbackResponse
    {
        public int result { get; set; }
        public string msg { get; set; }
    }

    public class GetPayResultRequest
    {
        public string orderno { get; set; }

    }
    public class GetPayResultResponse
    {
        public int result { get; set; }
        public string msg { get; set; }
    }
    public class GetPayInfoRequest
    {
        [Required(ErrorMessage = "Amount Id is required")]
        public decimal amount { get; set; }
        [Required(ErrorMessage = "OrderNo is required")]
        public string orderNo { get; set; }
        /// <summary>
        /// ”N” – Normal Payment (Sales) , ”H” – Hold Payment (Authorize only) 
        /// </summary>
        [Required(ErrorMessage = "PaymentType is required")]
        public string paymentType { get; set; }
        /// <summary>
        /// “344” – HKD, “840” – USD , “156” – CNY (RMB) ....
        /// </summary>
        [Required(ErrorMessage = "CurrencyCode is required")]
        public string currencyCode { get; set; }

    }
    public class GetPayInfoResponse
    {
        public string merchantId { get; set; }
        public string secureHash { get; set; }
    }
}
